﻿@if (Model.MainState == EditState.Preview)
{
    <CnGalWebSite.Shared.MasaComponent.Shared.Editors.Buttons.RevokeButton Url="@("/videos/EditMain/" + Model.Id)" ExamineType="Operation.EditVideoMain" OnClickRevoke="OnRevoke" />
}

<CnGalWebSite.Components.Containers.MasaTitleContainer Title="基础信息" Icon="@IconType.Infor.ToIconString()">
    <div class="basic-info-group-card">
        <div>
            <CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaIcon Type="IconType.Tag" />@Model.Type
        </div>
        @if (Model.IsInteractive)
        {
            <div>
                <CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaIcon Type="IconType.Category" />互动视频
            </div>
        }
        <div>
            <CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaIcon Type="IconType.Copyright" />@Model.Copyright.GetDisplayName()
    </div>
        <div>
            <CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaIcon Type="IconType.Read" />浏览数：@Model.ReaderCount
    </div>
        @if (Model.Duration.TotalSeconds != 0)
        {
            <div>
                <CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaIcon Type="IconType.Duration" />时长：@Model.Duration
            </div>
        }
        @if (string.IsNullOrWhiteSpace(Model.OriginalAuthor) == false)
        {
            <div>
                <CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaIcon Type="IconType.User" />原作者：@Model.OriginalAuthor
            </div>
        }
        <div>
            <CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaIcon Type="IconType.DeterminedTime" />发布时间：@Model.PubishTime.ToString("G")
        </div>
    </div>

</CnGalWebSite.Components.Containers.MasaTitleContainer>

@code {

    [Parameter]
    public EventCallback<Operation> OnRevoke { get; set; }
    [Parameter]
    public VideoViewModel Model { get; set; }

}
